/*
 *modified on 7, 2011
 */
void scan(void){ 
	initscan();
     while (fgets(s,MAXL+1,fps)!=(char *)NULL){
			line++;
			lsymb = symbol[nsymb++]=400+line;
          
			do{
				if(st=nexts(s,t) != 0){
					switch(0<st ? st : -st){
						case 1 :            
							illegalmatch();
							break;
						case 2 :
							delimiter();
							break;
						case 3:
							letterstr(t);
							break;
						case 4 :
							baddigitstr(t);
							break;
						case 5 :
							intstr(t);
							break;
						case 6 :
							floatstr(t);
							break;
						default :
							extradot(st-5,t);
                    } 
				}
			}while(0<st);
        }                        
		if(fclose(fps)){
            printf("**can't close %s **\n",fname);
            exit(1);
          }
         
		outscan();
}

